package com.wing.bill.model.response;


import com.wing.bill.model.entity.WarehouseBillDetail;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.util.List;

@Data
@NoArgsConstructor
@Accessors(chain = true)
public class WarehouseBillVO {

    private Long id;

    @Schema(description = "客户名称")
    private String customerName;

    @Schema(description = "账单月份（yyyy-MM）")
    private String billPeriod;

    @Schema(description = "产品数量")
    private Integer totalBills;

    @Schema(description = "合计金额")
    private Double billPrice;

    @Schema(description = "预计金额")
    private Double totalDetailPrice;

    @Schema(description = "结算状态（0-未结算，1-已结算，2-取消）")
    private String billStatus;
    private String billStatusDesc;

    public void setBillStatus(String billStatus){
        this.billStatus = billStatus;
        billStatusDesc = "0".equals(billStatus) ? "未结算" : "1".equals(billStatus) ? "已结算" : "取消";
    }

    @Schema(description = "账单类别（1、月结 2、手动）")
    private String billType;

    @Schema(description = "账单详情")
    private List<WarehouseBillDetail> warehouseBillDetailList;

    private List<WarehouseBillDetailVO> warehouseBillDetailVOList;
}
